#!/bin/bash

# 普通用户的SSH相关配置

MYUSER=yanjingtu

echo ">>>>Config SSH Settings for $MYUSER"

CURPATH=$(dirname $0)

if ! [ -d /home/$MYUSER/.ssh ]; then
	mkdir /home/$MYUSER/.ssh
fi

chmod 0755 /home/$MYUSER/.ssh
chmod 0750 /home/$MYUSER

cp -f $CURPATH/authorized_keys /home/$MYUSER/.ssh/
cp -f $CURPATH/id_rsa /home/$MYUSER/.ssh/

chmod 400 /home/$MYUSER/.ssh/authorized_keys
chmod 400 /home/$MYUSER/.ssh/id_rsa

chown -R $MYUSER:$MYUSER /home/$MYUSER/.ssh

